﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace WMM.Tapioca.Formula.Aspects
{
    public class DivideByAspect 
    {
        private string measure;

        /// <returns> The measures to add to the denominator measures. </returns>
        internal string Measure
        {
            get { return measure; }
            set { measure = value; }
        }

        private string source;

        /// <returns> The  @source attribute contain a QName. </returns>
        internal string Source
        {
            get { return source; }
            set { source = value; }
        }

        /// <summary>
        /// Constructor.
        /// </summary>
        public DivideByAspect(XElement divideByAspect)
        {
            if (divideByAspect.Attribute("measure") != null)
            {
                this.Measure = divideByAspect.Attribute("measure").Value;
            }
            if (divideByAspect.Attribute("source") != null)
            {
                this.Source = divideByAspect.Attribute("source").Value;
            }
        }
    }
}
